<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>

<head>
<base href="/">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">


<title>充值-二维码</title>
<meta name="keywords" content="充值-二维码">
<meta name="description"
	content="充值">

<link rel="shortcut icon" href="favicon.ico">

</head>


<body>
	<div id="box" class="hide"></div>


	<script src="static/templet/js/jquery.min.js?v=2.1.4"></script>
	<script src="static/templet/js/iframe.min.js"></script>
	<script src="static/templet/js/plugins/layer/layer.min.js"></script>
	<script type="text/javascript">

		save();
	
		function save() {

			var payMode = $.trim(parent.$("#payMode").val());

			var price = $.trim(parent.$("#price").val());
			var params = {};
			params.payMode = payMode;
			params.price = price;
			if(payMode == 'alipay'){
				params.payType='page';
				params.qrPayMode=1;
			}
			
			$.post('recharge/addRecharge', params, function(data, status) {
				if (status == 'success') {
					console.log(data);
					var result = data.result;
					var state = result.state;
					if (state == 1) {
						console.log(data.res);
						$('#box').html(data.res);
						
					} else {
						layer.msg(result.message, {
							icon : 1
						});
					}
				}else{

				}
			})
		}
	</script>
</body>

</html>